// components/gather/gather.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    data: {
      type: Object,
      value: {},
      observer: function (newVal, oldVal) {
        if (newVal) {
          this.setData({
            activityEndDate: newVal.activityEndDate ? newVal.activityEndDate.substr(5, 2) + "月" + newVal.activityEndDate.substr(8, 2) + "日 " + newVal.activityEndDate.substr(11, 8) + '开奖' : ""
          })
        }
      }
    },
  },

  /**
   * 组件的初始数据
   */
  data: {
    activityEndDate: ''
  },

  /**
   * 组件的方法列表
   */
  methods: {
    close() {
      this.triggerEvent('gatherclose')
    },
    exchange() {
      this.triggerEvent('exchange')
    }
  }
})